<div class="input-group mb-3">
  <div class="input-group-prepend">
    <span class="input-group-text" id="basic-addon1">标题</span>
  </div>
  <input type="text" class="form-control"  aria-label="Username" aria-describedby="basic-addon1" [(ngModel)]="n.title">
</div>

<div class="input-group mb-3">
  <div class="input-group-prepend">
    <span class="input-group-text" id="basic-addon2">作者</span>
  </div>
  <input type="text" class="form-control"  aria-label="Username" aria-describedby="basic-addon1" [(ngModel)]="n.author">
</div>


<div class="input-group mb-3">
  <div class="input-group-prepend">
    <span class="input-group-text" id="basic-addon3">新闻目录</span>
  </div>
  <div ngbDropdown class="d-inline-block">
    <button class="btn btn-outline-primary" id="dropdownBasic1" ngbDropdownToggle>目录</button>
    <div ngbDropdownMenu aria-labelledby="dropdownBasic1">
      <button ngbDropdownItem *ngFor="let c of cl" (click)="onCateSelectd(c)" >{{c.name}}</button>
    </div>
  </div>
  <input type="text" class="form-control"  aria-label="Username" aria-describedby="basic-addon1" [(ngModel)]="selectedcate.name">
</div>


  <div class="input-group">
    <div class="custom-file">
      <input type="file" class="custom-file-input"
             id="inputGroupFile04"
             (change)="onFileChange($event)"
             aria-describedby="inputGroupFileAddon04">

      <label class="custom-file-label" for="inputGroupFile04">请选择要上传的文件</label>
    </div>
  </div>
<img width="100px" height="100px" *ngIf="n.coverpic!=null" src="{{config.IMG_HOST}} {{n.coverpic}}"/>

<div class="input-group">
  <div class="input-group-prepend">
    <span class="input-group-text">内容</span>
  </div>
<!--  <textarea class="form-control" aria-label="With textarea" [(ngModel)]="n.content"></textarea>-->
  <quill-editor [(ngModel)]="n.content"></quill-editor>
</div>
<!--<div>-->
<!--  <code>{{n.content}}</code>-->
<!--</div>-->



<div class="input-group">
<button type="button" class="btn btn-primary" (click)="save()">保存</button>
<button type="button" class="btn btn-danger" (click)="cancel()">取消</button>
</div>
